Optimal. Leaf size=175 \[ \frac {(5 A+B) \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{8 \sqrt {2} a^2 c^{3/2} f}-\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}+\frac {(5 A+B) \cos (e+f x)}{8 a^2 f (c-c \sin (e+f x))^{3/2}}-\frac {(5 A+B) \sec (e+f x)}{6 a^2 c f \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.39, antiderivative size = 175, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2967, 2855, 2687, 2650, 2649, 206} \[ -\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}+\frac {(5 A+B) \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{8 \sqrt {2} a^2 c^{3/2} f}+\frac {(5 A+B) \cos (e+f x)}{8 a^2 f (c-c \sin (e+f x))^{3/2}}-\frac {(5 A+B) \sec (e+f x)}{6 a^2 c f \sqrt {c-c \sin (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2650
Rule 2687
Rule 2855
Rule 2967
Rubi steps
\begin {align*} \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))^{3/2}} \, dx &=\frac {\int \sec ^4(e+f x) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx}{a^2 c^2}\\ &=-\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}+\frac {(5 A+B) \int \frac {\sec ^2(e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx}{6 a^2 c}\\ &=-\frac {(5 A+B) \sec (e+f x)}{6 a^2 c f \sqrt {c-c \sin (e+f x)}}-\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}+\frac {(5 A+B) \int \frac {1}{(c-c \sin (e+f x))^{3/2}} \, dx}{4 a^2}\\ &=\frac {(5 A+B) \cos (e+f x)}{8 a^2 f (c-c \sin (e+f x))^{3/2}}-\frac {(5 A+B) \sec (e+f x)}{6 a^2 c f \sqrt {c-c \sin (e+f x)}}-\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}+\frac {(5 A+B) \int \frac {1}{\sqrt {c-c \sin (e+f x)}} \, dx}{16 a^2 c}\\ &=\frac {(5 A+B) \cos (e+f x)}{8 a^2 f (c-c \sin (e+f x))^{3/2}}-\frac {(5 A+B) \sec (e+f x)}{6 a^2 c f \sqrt {c-c \sin (e+f x)}}-\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}-\frac {(5 A+B) \operatorname {Subst}\left (\int \frac {1}{2 c-x^2} \, dx,x,-\frac {c \cos (e+f x)}{\sqrt {c-c \sin (e+f x)}}\right )}{8 a^2 c f}\\ &=\frac {(5 A+B) \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{8 \sqrt {2} a^2 c^{3/2} f}+\frac {(5 A+B) \cos (e+f x)}{8 a^2 f (c-c \sin (e+f x))^{3/2}}-\frac {(5 A+B) \sec (e+f x)}{6 a^2 c f \sqrt {c-c \sin (e+f x)}}-\frac {(A-B) \sec ^3(e+f x) \sqrt {c-c \sin (e+f x)}}{3 a^2 c^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.86, size = 300, normalized size = 1.71 \[ \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right ) \left (3 (A+B) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^3+6 (A+B) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^3+4 (B-A) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+(-3-3 i) \sqrt [4]{-1} (5 A+B) \tan ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (\tan \left (\frac {1}{4} (e+f x)\right )+1\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^3-12 A \cos ^2(e+f x)\right )}{24 a^2 f (\sin (e+f x)+1)^2 (c-c \sin (e+f x))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 206, normalized size = 1.18 \[ \frac {3 \, \sqrt {2} {\left (5 \, A + B\right )} \sqrt {c} \cos \left (f x + e\right )^{3} \log \left (-\frac {c \cos \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {-c \sin \left (f x + e\right ) + c} \sqrt {c} {\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )} + 3 \, c \cos \left (f x + e\right ) + {\left (c \cos \left (f x + e\right ) - 2 \, c\right )} \sin \left (f x + e\right ) + 2 \, c}{\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, {\left (3 \, {\left (5 \, A + B\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (5 \, A + B\right )} \sin \left (f x + e\right ) - 2 \, A - 10 \, B\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{96 \, a^{2} c^{2} f \cos \left (f x + e\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.56, size = 258, normalized size = 1.47 \[ -\frac {\sin \left (f x +e \right ) \left (15 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c A +3 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c B -20 A \,c^{\frac {5}{2}}-4 B \,c^{\frac {5}{2}}\right )+\left (30 A \,c^{\frac {5}{2}}+6 B \,c^{\frac {5}{2}}\right ) \left (\cos ^{2}\left (f x +e \right )\right )-15 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c A -3 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c B -4 A \,c^{\frac {5}{2}}-20 B \,c^{\frac {5}{2}}}{48 c^{\frac {7}{2}} a^{2} \left (1+\sin \left (f x +e \right )\right ) \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,\sin \left (e+f\,x\right )}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________